package org.coco24.pmstudio

import com.badlogic.gdx.scenes.scene2d.ui.Image
import com.badlogic.gdx.scenes.scene2d.ui.Table
import com.kotcrab.vis.ui.widget.VisLabel
import com.kotcrab.vis.ui.widget.VisTable
import com.kotcrab.vis.ui.widget.tabbedpane.Tab

class PokemonFormTab(val iconImage: Image = Image(GdxGame.getTextureRegion("icons/0.png")), val titleLabel: VisLabel): Tab(false, true)
{
    constructor(title: String): this(Image(GdxGame.getTextureRegion("icons/0.png")), VisLabel(title))
    val table = VisTable()
    init
    {
        table.add(iconImage).pad(2f)
        table.add(titleLabel).pad(2f)
        table.pack()
    }
    override fun getContentTable(): Table
    {
        return table
    }

    override fun getTabTitle(): String
    {
        return titleLabel.text.toString()
    }

}